{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "# `prettyplotlib.boxplot`\n",
      "\n",
      "The original matplotlib boxplots are okay, but their lines are too thick and the blues and reds are a little garish."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import matplotlib.pyplot as plt\n",
      "np.random.seed(10)\n",
      "\n",
      "data = np.random.randn(8, 4)\n",
      "labels = ['A', 'B', 'C', 'D']\n",
      "\n",
      "fig, ax = plt.subplots()\n",
      "ax.boxplot(data)\n",
      "ax.set_xticklabels(labels)\n",
      "fig.savefig('boxplot_matplotlib_default.png')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD9CAYAAABHnDf0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF4dJREFUeJzt3X9M1Pcdx/HXFWg61KmsDg2wQAIdSAFRN/aLei6lTpjE\n6jpt10iscczFOvfHui1ZIiSWjnRLu5bE1CVzNUvA1YRCMnrRbf026wySKVnX6VJMxzxACAZt1XaT\nkdsfrhS9O7i77/f4/rjnI7mmcB/u++63x4vPvb+f7/frC4VCIQEAPOUuuwsAAFiPcAcADyLcAcCD\nCHcA8CDCHQA8iHAHAA8yFe7BYFDr169XaWmp7r//fr3wwgthYwzD0OLFi1VZWanKykodPHjQzCYB\nADFIN/PDGRkZeu6557Rq1Spdv35da9asUU1NjUpKSm4bt27dOnV3d5sqFAAQO1Mz9+XLl2vVqlWS\npIULF6qkpEQjIyNh4zhPCgDml2U998HBQfX396uqquq27/t8Pp06dUoVFRWqra3VuXPnrNokACCa\nkAWuXbsWWrNmTaizszPsuffffz9048aNUCgUCvX09ISKiooivoYkHjx48OCRwCMS0zP3yclJbd26\nVY8//rg2b94c9vyiRYuUmZkpSdq4caM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\nQUGBnn/+ebvLcqWP3pt3LoV0I5ZCAoAH0ZYBAA8i3AHAgwh3APAgwh0APIhwBwAPItwBwIP+B84K\nYE1fs8t6AAAAAElFTkSuQmCC\n",
       "text": [
        "<matplotlib.figure.Figure at 0x1064d7610>"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "In `prettyplotlib`, we did the usual softening of the blacks and removing of the axes. We also changed the colors of the boxplot, which is actually really annoying to do by hand:\n",
      "\n",
      "    import brewer2mpl\n",
      "    set1 = brewer2mpl.get_map('Set1', 'qualitative', 7).mpl_colors\n",
      "\n",
      "    bp = ax.boxplot(x, **kwargs)\n",
      "    plt.setp(bp['boxes'], color=set1[1], linewidth=0.5)\n",
      "    plt.setp(bp['medians'], color=set1[0])\n",
      "    plt.setp(bp['whiskers'], color=set1[1], linestyle='solid', linewidth=0.5)\n",
      "    plt.setp(bp['fliers'], color=set1[1])\n",
      "    plt.setp(bp['caps'], color='none')\n",
      "\n",
      "So using `prettyplotlib.boxplot` is much easier."
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import prettyplotlib as ppl\n",
      "import matplotlib as mpl\n",
      "\n",
      "np.random.seed(10)\n",
      "\n",
      "data = np.random.randn(8, 4)\n",
      "labels = ['A', 'B', 'C', 'D']\n",
      "\n",
      "fig, ax = plt.subplots()\n",
      "ppl.boxplot(ax, data, xticklabels=labels)\n",
      "fig.savefig('boxplot_prettyplotlib_default.png')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "ename": "AttributeError",
       "evalue": "'tuple' object has no attribute 'pop'",
       "output_type": "pyerr",
       "traceback": [
        "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
        "\u001b[0;32m<ipython-input-7-161734915b21>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m      8\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      9\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0max\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msubplots\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 10\u001b[0;31m \u001b[0mppl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mboxplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0max\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mxticklabels\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     11\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msavefig\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'boxplot_prettyplotlib_default.png'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/olga/workspace-git/prettyplotlib/prettyplotlib/_boxplot.py\u001b[0m in \u001b[0;36mboxplot\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m     19\u001b[0m     \u001b[0;34m@\u001b[0m\u001b[0;32mreturn\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     20\u001b[0m     \"\"\"\n\u001b[0;32m---> 21\u001b[0;31m     \u001b[0max\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmaybe_get_ax\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     22\u001b[0m     \u001b[0;31m# If no ticklabels are specified, don't draw any\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     23\u001b[0m     \u001b[0mxticklabels\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'xticklabels'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;32m/Users/olga/workspace-git/prettyplotlib/prettyplotlib/utils.py\u001b[0m in \u001b[0;36mmaybe_get_ax\u001b[0;34m(args, kwargs)\u001b[0m\n\u001b[1;32m     80\u001b[0m     \"\"\"\n\u001b[1;32m     81\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmpl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 82\u001b[0;31m         \u001b[0max\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     83\u001b[0m         \u001b[0margs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     84\u001b[0m     \u001b[0;32melif\u001b[0m \u001b[0;34m'ax'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
        "\u001b[0;31mAttributeError\u001b[0m: 'tuple' object has no attribute 'pop'"
       ]
      },
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEIxJREFUeJzt3W9Ilff/x/HXiXNuRET/HJLnHLA8Bz1iamBZRHHaCF1j\n3qhu2K1mIiJEtFsbdSPtRsvujbxj0B/WShpbYDA7QdFpUDmjoqBamNR2PDCZK3EsKDtdvxv7fXVm\nHY96PNZ7zwcIXpyP1/XeB3nu6vwpl+M4jgAApsya6QEAAOlH3AHAIOIOAAYRdwAwiLgDgEHEHQAM\nGjfu27dvV3Z2tpYtW/bWNTt37lQwGFRJSYlu3bqV1gEBABM3btxramoUiUTe+nhHR4cePnyo7u5u\nHT58WA0NDWkdEAAwcePGfe3atVqwYMFbHz979qy2bdsmSSovL9fAwID6+vrSNyEAYMKm/Jx7PB6X\n3+8fPvb5fOrt7Z3qaQEAU5CWF1Rf/xsMXC5XOk4LAJgk91RP4PV6FYvFho97e3vl9XrHrAsEAurp\n6Znq5QDgPyUvL08PHz6c8M9N+c69qqpK33zzjSSps7NT8+fPV3Z29ph1PT09chyHL8fR3r17Z3yG\nd+WLvWAv2IvkX5O9KR73zn3r1q26fPmy+vv75ff71dTUpKGhIUlSfX29Nm7cqI6ODgUCAc2ZM0fH\njh2b1CAAgPQZN+5tbW3jnqSlpSUtwwAA0oNPqM6AcDg80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xb8dOXJEGzduzMRoGZfq70V7e/vwX19h8W2zqexDd3e3njx5ovXr16usrEwnTpzI9JgZkcpe\n1NXV6e7du8rJyVFJSYm+/vrrTI/5zphMN9P6v0E+9DRiIv9Nly5d0tGjR3XlypVpnGjmpLIXu3bt\n0oEDB+RyueQ4zpjfEQtS2YehoSHdvHlTFy9e1LNnz7R69WqtWrVKwWAwAxNmTip7sX//fpWWlioa\njaqnp0cbNmzQ7du3NXfu3AxM+O6ZaDfTGvd0fujpfZfKXkjSnTt3VFdXp0gkkvSPZe+zVPbixo0b\nqq6ulvTPC2nnzp2Tx+NRVVVVRmedTqnsg9/vV1ZWlmbPnq3Zs2dr3bp1un37trm4p7IXV69e1Z49\neyT980GeJUuW6MGDByorK8vorO+CSXUzba8IOI4zNDTkLF261Hn06JHz/PnzcV9QvXbtmtkXEVPZ\ni19//dXJy8tzrl27NkNTZkYqe/Fvn332mfPDDz9kcMLMSGUf7t+/73z00UfOy5cvnb///tspKipy\n7t69O0MTT59U9uLzzz93GhsbHcdxnN9//93xer3On3/+ORPjZsSjR49SekE11W6m9c6dDz2NSGUv\n9u3bp6dPnw4/z+zxeNTV1TWTY0+LVPbivyCVfSgoKFBlZaWKi4s1a9Ys1dXVqbCwcIYnT79U9mL3\n7t2qqalRSUmJXr16pYMHD2rhwoUzPPn02Lp1qy5fvqz+/n75/X41NTVpaGhI0uS7yYeYAMAg/pk9\nADCIuAOAQcQdAAwi7gBgEHEHAIOIOwAYRNwBwCDiDgAG/R9h/b4XlfACjQAAAABJRU5ErkJggg==\n",
       "text": [
        "<matplotlib.figure.Figure at 0x108a3d810>"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}